<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of HouseController
 *
 * @author Admin
 */
class Installation_HouseController extends Zend_Controller_Action {

    public function init() {
        /* Initialize action controller here */
    }

    public function preDispatch() {
        $auth = Zend_Auth::getInstance();
        if (!$auth->hasIdentity()) {
            $this->_redirect('/user/login');
        }

        $view = new Zend_View();
        $view->headTitle(' > Installation > Houses');
        $this->view->userDetail = $auth->getIdentity();
    }

    public function indexAction() {
        $houseModel = new Application_Model_HouseModel();
        $switchId = $this->_request->getParam('id');

        $this->view->paginator = $houseModel->getAllSwitchHouses($this->_request, $switchId);
    }

}